home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI230.ASC < prev    next >
Text File  |  1991-09-11  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT : TURBO PASCAL                               NUMBER : 230
  10.   VERSION : ALL
  11.        OS : PC-DOS, MS-DOS, CP/M-80, CP/M-86
  12.      DATE : April 8, 1986                                PAGE : 1/3
  13.     TITLE : MICROCALC MODIFICATIONS
  14.  
  15.  
  16.  
  17.  
  18.   The following are modifications to be made to MicroCalc. If you
  19.   are using CP/M-80, the section of code to modify is module MC-
  20.   MOD04.INC. For all other implementations, the code is located in
  21.   the main file CALC.PAS.
  22.  
  23.   Bring up the appropriate module into the Turbo Pascal editor, and
  24.   locate the following csegments of code. The lines to change are
  25.   marked as {version 2.00 modified}
  26.  
  27.   Modification 1:
  28.  
  29.     end else
  30.     if Ch='(' then
  31.     begin
  32.       NextCh;
  33.       F:=Expression;
  34.       if Ch =')' then NextCh;      { Ver. 2.00 modified }
  35.     end else
  36.       if Ch in ['A'..'G'] then { Maybe a cell reference }
  37.       begin
  38.         EFX:=Ch;
  39.         NextCh;
  40.  
  41.  
  42.   Modification 2:
  43.  
  44.           if Ch in Numbers then
  45.           begin
  46.             EXY:=EXY+Ch;
  47.             NextCh;
  48.           end;
  49.           if Ch = ')' then NextCh;                { Ver. 2.00 Addition }
  50.           Val(EXY,EFY,ErrPos);
  51.           IsFormula:=true;
  52.           if (Constant in Sheet[EFX,EFY].CellStatus) and
  53.             not (Calculated in Sheet[EFX,EFY].CellStatus) then
  54.           begin
  55.  
  56.   Modification 3:
  57.  
  58.           F:=Sheet[SumFX,SumFY].Value;
  59.           Cellsum:=Cellsum+f;
  60.           f:=Cellsum;
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.   PRODUCT : TURBO PASCAL                               NUMBER : 230
  76.   VERSION : ALL
  77.        OS : PC-DOS, MS-DOS, CP/M-80, CP/M-86
  78.      DATE : April 8, 1986                                PAGE : 2/3
  79.     TITLE : MICROCALC MODIFICATIONS
  80.  
  81.  
  82.  
  83.  
  84.         end;
  85.       end
  86.     end;
  87.   end else                            { Ver. 2.00 Modification }
  88.     if Ch = ')' then                  { Ver. 2.00 Addition     }
  89.     begin                             { Ver. 2.00 Addition     }
  90.       NextCh;                         { Ver. 2.00 Addition     }
  91.       Found := true;                  { Ver. 2.00 Addition     }
  92.     end;                              { Ver. 2.00 Addition     }
  93.   end;
  94.   end else
  95.   begin
  96.     found:=false;
  97.     for sf:=fabs to ffact do
  98.       if not found then
  99.       begin
  100.       l:=Length(StandardFunctionNames[sf]);
  101.       if copy(Formula,Pos - 1,l)=StandardFunctionNames[sf] then
  102.                                          { Ver. 2.00 Modification }
  103.       begin
  104.         Pos:=Pos+l-1; NextCh;
  105.         F:= Expression;                   { Ver. 2.00 Modification }
  106.         case sf of
  107.           fabs:     f:=abs(f);
  108.           fsqrt:    f:=sqrt(f);
  109.           fsqr:     f:=sqr(f);
  110.           fsin:     f:=sin(f);
  111.           fcos:     f:=cos(f);
  112.  
  113.   Modification 4:
  114.  
  115.                 ffact:    f:=fact(trunc(f));
  116.               end;
  117.               Found:=true;
  118.             end;
  119.           end;
  120.           if not Found then ErrPos:=Pos;
  121.         end;
  122.       end; { End if Ch in ['A'..'G'] }        { Ver. 2.00 Addition     }
  123.       Factor:=F;
  124.     end { function Factor};
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.